package com.haojiu.mapper;

import com.haojiu.pojo.Book;

import java.util.List;

/**
 * @author:我叫浩九
 * @date：2021/8/24 18:59
 * create in RuGao JiangSu
 */
public interface BookMapper {
    //增加一个Book
    int addBook(Book book);

    //根据id删除一个Book
    int deleteBookById(int id);

    //更新Book
    int updateBook(Book books);

    //根据id查询,返回一个Book
    Book queryBookById(int id);
    //根据name查询,返回一个Book
    Book queryBookByName(String bookName);
    //根据作者查询,返回一个Book
    List<Book> queryBookByAuthor(String author);
    //查询全部Book,返回list集合
    List<Book> queryAllBook();
    List<Book> getBookCountByType();
}
